package  com.openrange.dukes
{
	import com.openrange.dukes.Dukes.Duke;
	import com.openrange.dukes.Dukes.DukeManager;
	import com.openrange.dukes.Input.PlayerInput;
	import org.flixel.*;

	public class PlayState extends FlxState
	{
		private var dukeManager:DukeManager;		
		
		protected var _terrain:Terrain;
		protected var _gui:GUI;
			
		override public function create():void
		{			
			_terrain = new Terrain(this);
			_gui = new GUI(this, _terrain);
			
			dukeManager = new DukeManager(1, 3, _terrain, _gui);
		}
		
		override public function destroy():void
		{
			super.destroy();
			
			_terrain.destroy();
			dukeManager = null;
		}
		
		override public function update():void
		{
			super.update();
			dukeManager.Update();
		}
		
	}

}